package pojo;

public class InventoryInfo {
    private String partNumber;
    private String partName;
    private int inventoryQuantity;
    private int criticalValue;

    public InventoryInfo(String partNumber, String partName, int inventoryQuantity, int criticalValue) {
        this.partNumber = partNumber;
        this.partName = partName;
        this.inventoryQuantity = inventoryQuantity;
        this.criticalValue = criticalValue;
    }

    // Getters and setters
    public String getPartNumber() { return partNumber; }
    public void setPartNumber(String partNumber) { this.partNumber = partNumber; }

    public String getPartName() { return partName; }
    public void setPartName(String partName) { this.partName = partName; }

    public int getInventoryQuantity() { return inventoryQuantity; }
    public void setInventoryQuantity(int inventoryQuantity) { this.inventoryQuantity = inventoryQuantity; }

    public int getCriticalValue() { return criticalValue; }
    public void setCriticalValue(int criticalValue) { this.criticalValue = criticalValue; }
    //重写一下ToString方法，前面的描述用中文
    @Override
    public String toString() {
        return "零件编号：" + partNumber + ", 零件名称：" + partName + ", 库存数量：" + inventoryQuantity + ", 临界值：" + criticalValue;
    }
}
